package cn.zjgsu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.zjgsu.domain.TbCourse;
import cn.zjgsu.domain.TbStudent;
import cn.zjgsu.domain.TbTask;
import cn.zjgsu.domain.TbTeacher;
import cn.zjgsu.domain.TbUser;
import cn.zjgsu.mapping.TbCourseMapper;
import cn.zjgsu.mapping.TbStudentMapper;
import cn.zjgsu.mapping.TbTaskMapper;
import cn.zjgsu.mapping.TbTeacherMapper;
import cn.zjgsu.mapping.TbUserMapper;
import cn.zjgsu.service.ICourseService;
import cn.zjgsu.service.IStudentService;
import cn.zjgsu.service.ITaskService;
import cn.zjgsu.utils.SHA1;


@Service
public class CourseServiceImpl implements ICourseService{


	@Autowired
	private TbCourseMapper courseMapper;
	
	
	


	@Override
	public TbCourse findCourseById(int pkCourse) {
		TbCourse course=courseMapper.findCourseById(pkCourse); 
		return course;
	}



	@Override
	public void importCoursePoint(TbCourse course) {
		
		courseMapper.updateByPrimaryKeySelective(course);
	}



	@Override
	public void deleteCoursePoint(int pkCourse) {
		TbCourse course =new TbCourse();
		course.setPkCourse(pkCourse);
		course.setCoursePointAddress("");
		course.setCoursePointName("");
		courseMapper.updateByPrimaryKeySelective(course);
	}
	}




